import  Mock  from "mockjs";
import user from "./mockData/user.js";
import permission from "./mockData/permission.js"


// 定义mock请求拦截
Mock.mock('/api/home/getdata',
function(){
    console.log('拦截');
    return []
}
)



// 用户数据
// 创建
Mock.mock('/api/user/add','post',user.createUser)
// 更新用户
Mock.mock('/api/user/edit','post',user.updateUser)
// 删除
Mock.mock('/api/user/del','post',user.deleteUser)
// 获取数据
Mock.mock(/api\/user\/getuser/,user.getUserList)



// 拦截
Mock.mock(/api\/permission\/getMenu/,'post',permission.getMenu)